<include file="Public/min-header"/>
<link href="__PUBLIC__/plugins/daterangepicker/daterangepicker-bs3.css" rel="stylesheet" type="text/css" />
<script src="__PUBLIC__/plugins/daterangepicker/moment.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/plugins/daterangepicker/daterangepicker.js" type="text/javascript"></script>
<div class="wrapper">
  <section class="content">
    <div class="container-fluid"> 
      <div class="panel panel-default">
        <div class="panel-heading">
          <h3 class="panel-title"><i class="fa fa-list"></i> 结算金额明细</h3>
        </div>
        <div class="panel-body">    
		<div class="navbar navbar-default">
                <form id="search-form2" class="navbar-form form-inline"  method="get" action="/index.php/Seller/Finance/order_statis_shouhuo">
				<div class="form-group">
				  <div class="input-group">
				      <input type="text" name="order_sn" id="order_sn" value="{:I('order_sn')}" placeholder="订单编号" class="input-sm">
				        </div>
				 </div>
				 <div class="form-group">
					 <input type="hidden" name="id" id="id" value="{:I('id')}">
				     <button type="submit" id="button-filter search-order" class="btn btn-primary"><i class="fa fa-search"></i> 筛选</button>
				      </div>
                <div class="form-group" style="float: right;">    
                    <button type="button" class="btn btn-default pull-right" id="daochu"><i class="fa fa-file-excel-o"></i>&nbsp;导出excel</button>
                </div>                                 
                </form>    
          </div>                        
          <div id="ajax_return">                  
                    <div class="table-responsive">
                        <table class="table table-bordered table-hover">
                            <thead>
                            <tr>
								<th class="sorting text-left">ID</th>
                                <th class="sorting text-left">单号</th>
								<th class="sorting text-left">买家</th>
                                <th class="sorting text-left">订单金额</th>
<!--								<th class="sorting text-left">平台收款</th>-->
                                <th class="sorting text-left">平台扣点</th>
                                <th class="sorting text-left">抹零金额</th>
                                <th class="sorting text-left">应收金额</th>
                                <th class="sorting text-left">入库时间</th>
                            </tr>
                            </thead>
                            <tbody>
                            <volist name="list" id="v">
                                <tr>
									<td class="text-left">{$v.withdrawals_id}</td>
                                    <td class="text-left">{$v.order_sn}</td> 
									<td class="text-left">{$v.company}</td> 
                                    <td class="text-left" style="color:#f39c12;">{$v.order_totals}</td>
<!--									<td class="text-left" style="color:blue;">{$v.order_totals}</td>-->
                                    <td class="text-left" style="color:blue;">-{$v.commis_totals}</td>
                                    <td class="text-left" >{$v.change}</td>
                                    <td class="text-left" style="color:red;">{$v.result_totals}</td>
									<td class="text-left">{$v.ruku_last_time|date="Y-m-d H:i",###}</td>
                                    <!--<td class="text-left"><a href="{:U('Admin/Distribut/editWithdrawals',array('id'=>$v[withdrawals_id]))}">查看</a></td>-->
                                </tr>
                            </volist>
							<tr>
								<td colspan="3" align="right"><b>合计：</b></td>
<!--								<td style="font-size: 15px;color: #f39c12;font-size: 16px;">￥{$dan_heji}</td>-->
								<td style="font-size: 15px;color: #f39c12;font-size: 16px;">￥{$shi_heji}</td>
								<td style="font-size: 15px;color: blue;font-size: 16px;">￥{$kou_heji}</td>
								<td style="font-size: 15px;color: blue;font-size: 16px;"></td>
								<td colspan="2" style="font-size: 15px;color: red;font-size: 16px;">￥{$yin_heji}</td>
							</tr>
                            </tbody>
                        </table>
                    </div>
                
                <div class="row">
                    <div class="col-sm-6 text-left"></div>
                    <div class="col-sm-6 text-right">{$show}</div>
                </div>
          
          </div>
        </div>
      </div>
    </div>
    <!-- /.row --> 
  </section>
  <!-- /.content --> 
</div>
<!-- /.content-wrapper --> 
 <script>
 
$(document).ready(function() {
	$('#create_date').daterangepicker({
		format:"YYYY-MM-DD",
		singleDatePicker: false,
		showDropdowns: true,
		minDate:'2020-01-01',
		maxDate:'2030-01-01',
		startDate:'{:date("Y-m-d H:i")}',
        showWeekNumbers: true,
        timePicker: false,
        timePickerIncrement: 1,
        timePicker12Hour: true,
        ranges: {
           '今天': [moment(), moment()],
           '昨天': [moment().subtract('days', 1), moment().subtract('days', 1)],
           '最近7天': [moment().subtract('days', 6), moment()],
           '最近30天': [moment().subtract('days', 29), moment()],
           '上一个月': [moment().subtract('month', 1).startOf('month'), moment().subtract('month', 1).endOf('month')]
        },
        opens: 'right',
        buttonClasses: ['btn btn-default'],
        applyClass: 'btn-small btn-primary',
        cancelClass: 'btn-small',
	    locale : {
            applyLabel : '确定',
            cancelLabel : '取消',
            fromLabel : '起始时间',
            toLabel : '结束时间',
            customRangeLabel : '自定义',
            daysOfWeek : [ '日', '一', '二', '三', '四', '五', '六' ],
            monthNames : [ '一月', '二月', '三月', '四月', '五月', '六月','七月', '八月', '九月', '十月', '十一月', '十二月' ],
            firstDay : 1
        }
	});
		$("#daochu").click(function(){
			//alert('敬请期待。。。');return false;
			var order_sn=$("#order_sn").val();
			var id=$('#id').val();
			location.href="/index.php/Seller/Finance/export_statis_shouhuo?order_sn="+order_sn+"&id="+id;
		})
});
</script>
</body>
</html>